from django.db import models

# Create your models here.


class FunctionMenu(models.Model):
    """"功能菜单"""
    id = models.IntegerField(primary_key=True)
    module_id = models.CharField(db_column='MODULE_ID', max_length=32, blank=True, null=True)  # Field name made lowercase.
    menu_name = models.CharField(db_column='MENU_NAME', max_length=32, blank=True, null=True)  # Field name made lowercase.
    menu_desc = models.CharField(db_column='MENU_DESC', max_length=1024, blank=True, null=True)  # Field name made lowercase.
    menu_connet = models.CharField(db_column='MENU_connet', max_length=32, blank=True, null=True)  # Field name made lowercase.
    authid = models.CharField(db_column='AUTHID', max_length=32, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        db_table = 'function_menu'



class Role(models.Model):
    """"角色"""
    roleid = models.CharField(db_column='ROLEID', max_length=40, blank=True, null=True)  # Field name made lowercase.
    rolecode = models.CharField(db_column='ROLECODE', max_length=40, blank=True, null=True)  # Field name made lowercase.
    rolename = models.CharField(db_column='ROLENAME', max_length=40, blank=True, null=True)  # Field name made lowercase.
    description = models.CharField(db_column='DESCRIPTION', max_length=400, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        db_table = 'role'


class TUcpAuthelement(models.Model):
    """"功能权限"""
    authid = models.CharField(db_column='AUTHID', primary_key=True, max_length=40)  # Field name made lowercase.
    moduleid = models.CharField(db_column='MODULEID', max_length=40, blank=True, null=True)  # Field name made lowercase.
    authcode = models.CharField(db_column='AUTHCODE', max_length=40, blank=True, null=True)  # Field name made lowercase.
    supercode = models.CharField(db_column='SUPERCODE', max_length=40, blank=True, null=True)  # Field name made lowercase.
    authname = models.CharField(db_column='AUTHNAME', max_length=40, blank=True, null=True)  # Field name made lowercase.
    menuflag = models.CharField(db_column='MENUFLAG', max_length=1, blank=True, null=True)  # Field name made lowercase.
    description = models.CharField(db_column='DESCRIPTION', max_length=400, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        db_table = 't_ucp_authelement'


class TUcpPutroleuser(models.Model):
    """"角色人员关系"""
    staffid = models.CharField(db_column='STAFFID', max_length=40, blank=True, null=True)  # Field name made lowercase.
    roleid = models.CharField(db_column='ROLEID', max_length=40, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        db_table = 't_ucp_putroleuser'


class TUcpRoleauth(models.Model):
    """"角色权限"""
    roleid = models.CharField(db_column='ROLEID', max_length=40, blank=True, null=True)  # Field name made lowercase.
    authid = models.CharField(db_column='AUTHID', max_length=40, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        db_table = 't_ucp_roleauth'